package 代理模式;

// 真实图像类
class RealImage implements Image {
    private String filename;
 
    public RealImage(String filename) {
        this.filename = filename;
        loadImageFromDisk();
    }
 
    private void loadImageFromDisk() {
        System.out.println("Loading image from disk: " + filename);
    }
 
    public void display() {
        System.out.println("Displaying image: " + filename);
    }
}